//创建一个路由，并暴露出去
//第一步：引入路由器
import {createRouter,createWebHistory} from 'vue-router';
//引入路由组件
import Login from '../pages/Login.vue'
import Select from '../pages/Select.vue'
import Message from '../pages/Message.vue'
import Tickets from '../pages/Tickets.vue'
import MyOrder from '../pages/MyOrder.vue'
import Condition from '../pages/Condition.vue'
import Select1 from '../pages/Select1.vue'


//第二步：创建路由器
const router =createRouter({
    history:createWebHistory(),
    //路由规则
    routes:[
        {
            name:'myorder',
            path:'/myorder',
            component:MyOrder
        },
        {
            path:'/',
            redirect:'/login'
        },
        {
            name:'login',
            path:'/login',
            component:Login
        },
        {
            name:'select',
            path:'/select',
            component:Select
        },
        {
            name:'message',
            path:'/message',
            component:Message
        },
        {
            name:'tickets',
            path:'/tickets',
            component:Tickets
        },
        {
            name:'condition',
            path:'/condition',
            component:Condition
        },
        {
            name:'select1',
            path:'/select1',
            component:Select1
        }
    ]
})

export default router